AS	=as --32
LD	=ld
CC	=gcc -m32 $(RAMDISK)
CFLAGS	=-Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../../include

.c.s:
	$(CC) $(CFLAGS) \
	-S -o $*.s $<
.s.o:
	$(AS) -c -o $*.o $<
.c.o:
	$(CC) $(CFLAGS) \
	-c -o $*.o $<

OBJS  = floppy.o

blk_drv.a: $(OBJS)
	$(AR) rcs blk_drv.a $(OBJS)
	sync

clean:
	rm -f *.o *.a
	for i in *.c;do rm -f `basename $$i .c`.s;done
